package com.pureut.storage.dubbo;

import com.pureut.storage.service.WipCompletionService;
import com.sale.common.core.domain.R;
import com.sale.storage.api.RemoteWipService;
import com.sale.storage.api.dto.UpdateWipByAdjustmentVo;
import com.sale.storage.api.dto.WipCompletionMessageDto;
import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

/**
 * 完工入库服务
 */
@RequiredArgsConstructor
@DubboService
@Service
public class RemoteWipServiceImpl implements RemoteWipService {

    private final WipCompletionService wipCompletionService;

    /**
     * 根据单据号获取完工入库信息（成本调整使用）
     */
    @Override
    public WipCompletionMessageDto getWipCompletionMessage(String documentNumber) {
        return wipCompletionService.getWipCompletionMessage(documentNumber);
    }

    /**
     * 修改完工入库信息（成本调整使用）
     */
    @Override
    public boolean updateWipByAdjustment(UpdateWipByAdjustmentVo updateWipByAdjustmentVo) {
        return wipCompletionService.updateWipByAdjustment(updateWipByAdjustmentVo);
    }
}
